/*
test.cpp: An educational assembly simulator, sample file.
    Copyright (C) 2010  Daniel Gutson, FuDePAN

    This file is part of the learn-asm project.

    learn-asm is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    learn-asm is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with learn-asm.  If not, see <http://www.gnu.org/licenses/>.

    Run './build test.cpp' to try this file. 
*/

#include "AbacusSim.h"

BEGIN_PROGRAM

    BEGIN_MEMORY
        9,14,26,20,27,9,28,2,19,11,8,14,4,9,25,7,17,31,14,17,28,20,18,19,
        2,5,10,8,10,16,22,9
    END_MEMORY


    Load(R1, memory[Immediate(0)]);
    Add(R1, Immediate(2));
    Load(R1, memory[R1]);
    PrintReg(R1);

    Add(R1, Immediate(3));
    Load(R1, memory[R1]);
    PrintReg(R1);
    Store(memory[Immediate(0)], R1);

END_PROGRAM


